package com.wbxqy.car_management_system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wbxqy.car_management_system.dto.TimeSlot;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author wbxqy
 * @since 2024-07-04
 */
@Getter
@Setter
@TableName("t_user_wbxqy")
@ApiModel(value = "User对象", description = "用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户ID，主键")
    @TableId(value = "user_id_wbxqy", type = IdType.AUTO)
    private Integer userIdWbxqy;

    @ApiModelProperty("用户名")
    private String usernameWbxqy;

    @ApiModelProperty("密码（加密）")
    private String passwordWbxqy;

    @ApiModelProperty("用户角色")
    private String roleWbxqy;

    @ApiModelProperty("邮箱")
    private String emailWbxqy;

    @ApiModelProperty("电话号码")
    private String phoneNumberWbxqy;

    @ApiModelProperty("用户头像的URL")
    private String avatarUrlWbxqy;

    @ApiModelProperty("所属部门id")
    private Integer departmentIdWbxqy;

    @ApiModelProperty("用户状态 N 正常 O 外出 E 封禁")
    private String statusWbxqy;

    @ApiModelProperty("外出用车ID")
    private Integer carIdWbxqy;

    @ApiModelProperty("记录创建时间")
    private LocalDateTime createTimeWbxqy;

    @ApiModelProperty("记录更新时间")
    private LocalDateTime updateTimeWbxqy;


    @ApiModelProperty("是否删除标记，逻辑删除")
    private Boolean isDeletedWbxqy;

    @ApiModelProperty("所属部门")
    @TableField(exist = false)
    private Department department;

    @ApiModelProperty("不空闲时间表")
    @TableField(exist = false)
    private List<TimeSlot> unfreeList;

    @Override
    public String toString() {
        return "User{" +
                "userIdWbxqy=" + userIdWbxqy +
                ", usernameWbxqy='" + usernameWbxqy + '\'' +
                ", passwordWbxqy='" + passwordWbxqy + '\'' +
                ", roleWbxqy='" + roleWbxqy + '\'' +
                ", emailWbxqy='" + emailWbxqy + '\'' +
                ", phoneNumberWbxqy='" + phoneNumberWbxqy + '\'' +
                ", avatarUrlWbxqy='" + avatarUrlWbxqy + '\'' +
                ", departmentIdWbxqy=" + departmentIdWbxqy +
                ", createTimeWbxqy=" + createTimeWbxqy +
                ", updateTimeWbxqy=" + updateTimeWbxqy +
                ", isDeletedWbxqy=" + isDeletedWbxqy +
                '}';
    }
}
